﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BA2009.Entities;
using BA2009.Data.DataAccess;
using BA2009.Data.Filters;

namespace BA2009.Services
{
    public class PageService:ServiceBase<Page>,IPageService
    {
         public PageService(IRepository<Page> repository)
        {
            //if (repository == null)
            //    repository = new PageRepository();

            this.repository = repository;
        }

        //public PageService()
        //    : this(null)
        //{ }

        public IList<Page> GetPagesByCode(string code)
        {
            return repository.FindAll().FilterByCode(code).ToList(); ;
        }
    }
}
